package com.samuel.el;


import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.io.IOException;

/**
 * @date:2017/11/21
 * @time: 11:46
 * @author:zhaoyang
 * @desc:启动Spring
 **/
public class ELMain {


    public static void main(String[] args) {

        // 获取Spring注解配置类的上下文
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppIEConfig.class);


        ElConfig elConnfig = context.getBean(ElConfig.class);
        try {
            elConnfig.outputResource();
        } catch (IOException e) {
            e.printStackTrace();
        }


        //关闭上下文
        context.close();
    }

}
